package db

import org.hibernate.Session

/**
 * manages operation with files in front of the database.
 * enables to save, update and delete a file
 */
class FileManager(session: Session) {
  if (session == null) {
    throw new RuntimeException("Invalid session object")
  }

  def saveFile(file: File) {
    session.save(file)
  }
  
  def updateFile(file: File){
    session.update(file)
  }

  def deleteFile(file: File) {
    session.delete(file)
  }

}